// 数组与指针
#include <stdio.h>

int main(int argc, char **argv)
{
    int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    int *p = arr;
    int i = 0;

    // 输出
    for (i = 0; i < 10; i++)
    {
        printf("%d  ", p[i]);
    }
    putchar('\n');

    printf("==============================\n");

    for (i = 0; i < 10; i++)
    {
        printf("%d  ", *(p + i));
    }
    putchar('\n');

    printf("==============================\n");

    for (i = 0; i < 10; i++)
    {
        printf("%d  ", *(arr + i));
    }
    putchar('\n');

    printf("==============================\n");

    for (i = 0; i < 10; i++, p++)
    {
        printf("%d  ", *p);
    }
    putchar('\n');
    return 0;
}